#include <linux/tty.h>

struct tty_struct tty_table[] = {
	{
		{0,
		OPOST|ONLCR,	/* change outgoing NL to CRNL */
		0,
		ICANON | ECHO | ECHOCTL | ECHOKE,
		0,		/* console termio */
		INIT_C_CC},
		0,			/* initial pgrp */
		0,			/* initial stopped */
		con_write,
		{0,0,0,0,""},		/* console read-queue */
		{0,0,0,0,""},		/* console write-queue */
		{0,0,0,0,""}		/* console secondary queue */
	}
};

void tty_init(void)
{
	con_init();
}

int tty_write(unsigned channel, char * buf, int nr)
{
	struct tty_struct * tty;
	char c;
        char *b = buf;
	tty = tty_table;
	while (nr>0) {
		c = *(b);
		b++; nr--;
		PUTCH(c,tty->write_q);
	}
	tty->write(tty);
	return 0;
}


